<template>
  <el-table :data="props.data" border>
    <slot name="start" />
    <el-table-column align="center" label="角色id">
      <template #default="scope">
        {{ scope.row.id }}
      </template>
    </el-table-column>
    <el-table-column align="center" label="角色名称">
      <template #default="scope">
        {{ scope.row.name }}
      </template>
    </el-table-column>
    <el-table-column align="center" label="默认">
      <template #default="scope">
        {{ scope.row.isDefault ? '是' : '否' }}
      </template>
    </el-table-column>
    <slot name="end" />
  </el-table>
</template>

<script setup lang="ts">
import { PropType } from 'vue'

import type { IRole } from '@/http/types/role'

const props = defineProps({
  data: {
    type: Array as PropType<IRole[]>,
    default: () => [],
  },
})
</script>

<style scoped lang="scss">
// .userTable{}
</style>
